package top.hcode.hoj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import top.hcode.hoj.common.result.CommonResult;
import top.hcode.hoj.pojo.entity.problem.TagClassification;
import top.hcode.hoj.pojo.entity.user.Dep;

import java.util.List;

@Mapper
@Repository
public interface DepMapper extends BaseMapper<Dep> {

    @Select("select id,depname from dep")
    List<Dep> getdeplists(String oj);

    @Insert("INSERT INTO dep(id, depname) VALUES(#{id}, #{depname})")
    boolean adddep(Dep dep);

    @Update("UPDATE dep SET depname = #{depname} WHERE id = #{id}")
    void updatedep(Dep dep);
}
